<template>
  <div class="custom-header" :style="{'width':widthDiv}">
    <el-row :gutter="10">
      <el-col span="24" class="custom-value">{{ no }}  -  {{ name }}</el-col>
    </el-row>
  </div>
</template>

<script>
import '@/styles/custom/custom.scss';

export default {
  name: "leftTitle",
  //props: ['widthDiv', 'contents', 'titleSpan', 'contentSpan'],
  props:{
    widthDiv:{
      type:String,
      default:'450px'
    },
    contents:Object
  },
  data() {
    return {
      no: '',
      name: '',
    }
  },
  watch: {
    contents: {
      handler(newVal) {
        const {no: no, name: name} = newVal;
        this.no = no;
        this.name = name;
      },
      //子组件加载时立即执行
      immediate: true,
    }
  }
}
</script>

<style scoped>

</style>
